import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
// import { component } from 'vue/types/umd'
import CenterView from '../views/CenterView.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import('../views/LoginView.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/LoginView.vue'),
  },
  {
    path: '/register',
    name: 'register',
    component: () => import('../views/RegisterView.vue'),
	},
  {
    path: '/adminHome',
    name: 'adminHome',
	redirect :'/adminHome/center',
    component: () => import('../views/AdminHomeView.vue'),
	   children:[
				{
					path:'center',
					component:() => import('../views/CenterView.vue')
				},
				{
					path:'userCenter',
					component:() => import('../views/UserCenterView.vue')
				},
				{
					path:'modifyPassword',
					component:() => import('../views/ModifyPasswordView.vue')
				},
				{
					path:'outHouse',
					component:() => import('../views/OutHouseView.vue')
				},
				{
					path:'inHouse',
					component:() => import('../views/InHouseView.vue')
				},
				{
					path:'home',
					component:() => import('../views/HomeView.vue')
				},
				{
					path:'sale',
					component:() => import('../views/SaleView.vue')
				},
				{
					path:'person',
					component:() => import('../views/PersonView.vue')
				},
				{
					path:'sell',
					component:() => import('../views/SellView.vue')
				},
			]
  }
]


const router = new VueRouter({
  routes
})

export default router
